﻿<controls:ChildWindow x:Class="SD.Shapes.Samples.CustomConnection.MyConnectionEditor" Title="Connection Editor"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    Width="350">
    <Grid Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <TextBlock Grid.Row="0" Text="Source Text:" VerticalAlignment="Center" Margin="0,0,10,0" />
        <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding SourceText, Mode=TwoWay}" />

        <TextBlock Grid.Row="1" Text="Source Multiplicity:" VerticalAlignment="Center" Margin="0,5,10,0" />
        <ComboBox Grid.Row="1" Grid.Column="1" SelectedItem="{Binding SourceMultiplicity, Mode=TwoWay}" Margin="0,5,0,0">
            <system:String>1</system:String>
            <system:String>*</system:String>
            <system:String>0..1</system:String>
            <system:String>0..*</system:String>
            <system:String>1..1</system:String>
            <system:String>1..*</system:String>
        </ComboBox>

        <TextBlock Grid.Row="2" Text="Sink Text:" VerticalAlignment="Center" Margin="0,5,10,0" />
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding SinkText, Mode=TwoWay}" Margin="0,5,0,0" />

        <TextBlock Grid.Row="3" Text="Sink Multiplicity:" VerticalAlignment="Center" Margin="0,5,10,0" />
        <ComboBox Grid.Row="3" Grid.Column="1" SelectedItem="{Binding SinkMultiplicity, Mode=TwoWay}" Margin="0,5,0,0">
            <system:String>1</system:String>
            <system:String>*</system:String>
            <system:String>0..1</system:String>
            <system:String>0..*</system:String>
            <system:String>1..1</system:String>
            <system:String>1..*</system:String>
        </ComboBox>
        
        <StackPanel Grid.Row="4" Grid.ColumnSpan="2">
            <Rectangle Height="1" Fill="LightGray" Margin="0,10,0,10" />
            
            <Button Content="OK" Click="OKButton_Click" Width="75" MinHeight="23" HorizontalAlignment="Right" />
        </StackPanel>
    </Grid>
</controls:ChildWindow>